home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Resource for Source: C/C++
/
Resource for Source - C-C++.iso
/
misc_src
/
tabvie
/
mainview.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1995-11-01
|
2KB
|
88 lines
// ordview.cpp : implementation of the CMainView class
//
#include "stdafx.h"
#include "tab.h"
#include "tabdoc.h"
#include "mainview.h"
//
//include children tab views here for each tab type
//
#include "drawview.h"
#include "ordervw.h"
#include "editvw.h"
#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
#define BASE CTabView
#define THIS CMainView
/////////////////////////////////////////////////////////////////////////////
// CMainView
IMPLEMENT_DYNCREATE(CMainView, CTabView)
BEGIN_MESSAGE_MAP(CMainView, CTabView)
//{{AFX_MSG_MAP(CMainView)
//}}AFX_MSG_MAP
// Standard printing commands
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMainView construction/destruction
THIS::THIS()
{
// TODO: add construction code here
}
THIS::~THIS()
{
}
/////////////////////////////////////////////////////////////////////////////
// CMainView diagnostics
#ifdef _DEBUG
void THIS::AssertValid() const
{
BASE::AssertValid();
}
void THIS::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CTabDoc* THIS::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTabDoc)));
return (CTabDoc*) m_pDocument;
}
#endif //_DEBUG
void THIS::OnInitialUpdate()
{
COrderView* pOrderView = (COrderView*) addTabView(RUNTIME_CLASS(COrderView),GetDocument(),
"&Options");
ASSERT(pOrderView != NULL);
pOrderView->m_pTabView = this;
CDrawView* pDrawView = (CDrawView*) addTabView(RUNTIME_CLASS(CDrawView),GetDocument(),
"&Graphics",TRUE,FALSE);
ASSERT(pDrawView != NULL);
pDrawView->m_pTabView = this;
CEditVw* pEditView = (CEditVw*) addTabView(RUNTIME_CLASS(CEditVw),GetDocument(),
"&Edit",TRUE,FALSE);
ASSERT(pEditView != NULL);
pEditView->m_pTabView = this;
BASE::OnInitialUpdate();
}